<cfinclude template="settings.cfm">
	<cfquery name="insertNewCommenter" datasource="#fSDS#">
		INSERT INTO commenters VALUES (NULL,'#email#','0','#hashPut#')
	</cfquery>

	<cfquery name="getNewCommenter" datasource="#fSDS#">
    	SELECT * FROM commenters
        WHERE `randomHash` = '#hashPut#'
    </cfquery>
    
	<cfoutput query="getNewCommenter">
    
    	<cfquery name="insertComment" datasource="#fSDS#">
        
    		INSERT INTO comments VALUES 			(NULL,'#commenterID#','#name#','#website#','#theComment#','#postID#','#TimeFormat(now())#','#DateFormat(now())#','#approved#')
            
    	</cfquery>
        
        <cfset returnMessage = "<b>Comment submitted. Please check your email to complete your one-time email verification.</b>">
        
	</cfoutput>
	
    <cfmail from="#fSFEOR#" to="#email#" subject="Activate your e-mail address and comment!" replyto="#fSRTEOR#">
Hello! Thanks for posting a comment on my blog -- I really appreciate it. Since this is the first time you have posted on my blog (from #email#, anyway), I need you to "activate" your email address. This is a one-time requirement, as once your email address is activated, all future comments will be approved automatically.

To activate #email#, click here: http://192.168.0.101/confirmEmailAddress.cfm?confirm=#hashPut#

Thanks very much!  
	</cfmail>
    
<cfinclude template="footer.cfm">